<extend name="Public/common" />
<block name="body">
<div class="tabmenu">
    <ul class="tab pngFix">
  <li class="active"><a href="javascript:void(0)">修改密码</a></li></ul>
</div>
<div class="ncsc-form-default">
  <form method="post"  action="{:U('store/user/updatepassword')}" enctype="multipart/form-data" id="form1">
    <dl>
      <dt>原密码:</dt>
      <dd>
        <input class="w200 text" id="old_password" name="old_password" type="password" />
      </dd>
    </dl>
    <dl>
      <dt>新密码:</dt>
      <dd>
        <input class="text w200" id="password" name="password" type="password" />
      </dd>
    </dl>
    <dl>
      <dt>确认密码:</dt>
      <dd>
          <input class="text w200" id="confirm_password" name="confirm_password" type="password" />
      </dd>
    </dl>
    <div class="bottom">
        <label class="submit-border"><input type="submit" class="submit" value="提交" /></label>
      </div>
  </form>
</div>
<script type="text/javascript">
$(function(){
	$('#form1').validate({
    	submitHandler:function(form){
    		ajaxpost('form1', '', '', 'onerror')
    	},
        rules : {
        	old_password : {
        		required : true,
				minlength: 6,
				maxlength: 20
            },
        	password : {
        		required : true,
				minlength: 6,
				maxlength: 20
            },
            confirm_password : {
				minlength: 6,
				maxlength: 20,
				equalTo: '#password'
            }
        },
        messages : {
        	old_password : {
                required : '原密码必须填写',
				minlength: '密码长度为6-20',
				maxlength: '密码长度为6-20'
            },
            password : {
            	required : '新密码必须填写',
				minlength: '密码长度为6-20',
				maxlength: '密码长度为6-20'
            },
            confirm_password : {
				minlength: '密码长度为6-20',
				maxlength: '密码长度为6-20',
				equalTo:   '确认密码与密码不匹配'
            }
        }
    });
    
  
    
});
</script> 

</block>
